Conversation
ce824a8 to
cbe6701
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces initial frontend navigation and market browsing UX: a landing page that lists markets and links into per-market pages via slugged routes, plus shared layout elements (header, styling, and React Query setup).
Changes:
- Added a markets landing page and per-market route (
/market/[slug]) with slug resolution helpers. - Introduced React Query providers + hooks, and stubbed market query functions.
- Added a global header and expanded global CSS styling for the new pages/components.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/lib/slug.ts | Adds prefix-map generation and slug resolution for market routes. |
| frontend/src/lib/rpc.ts | Placeholder file intended for RPC/env encapsulation (currently empty). |
| frontend/src/lib/queries/fetch-market.ts | Adds stubbed single-market fetch helper and type. |
| frontend/src/lib/queries/fetch-all-markets.ts | Adds stubbed all-markets fetch helper and type. |
| frontend/src/lib/providers.tsx | Introduces React Query provider (and devtools) wiring. |
| frontend/src/lib/hooks/use-market.ts | Adds useMarket query hook. |
| frontend/src/lib/hooks/use-all-markets.ts | Adds useAllMarkets query hook. |
| frontend/src/components/header.tsx | Adds a sticky header with basic navigation links. |
| frontend/src/app/page.tsx | Replaces the starter home page with a markets table + links to market pages. |
| frontend/src/app/market/[slug]/page.tsx | Adds server route for a slugged market page + metadata generation. |
| frontend/src/app/market/[slug]/market-view.tsx | Adds client-side market detail view using React Query. |
| frontend/src/app/layout.tsx | Wraps app with Providers/Header and adds favicon metadata. |
| frontend/src/app/info/page.tsx | Adds placeholder Info page. |
| frontend/src/app/repo/page.tsx | Adds placeholder Repo page. |
| frontend/src/app/team/page.tsx | Adds placeholder Team page. |
| frontend/src/app/globals.css | Adds styling for header, page layout, and market table/detail components. |
| frontend/package.json | Adjusts Biome lint script invocation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 43 out of 45 changed files in this pull request and generated 7 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 18 changed files in this pull request and generated 4 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 24 out of 27 changed files in this pull request and generated 4 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 24 out of 26 changed files in this pull request and generated 3 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 24 out of 26 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 25 out of 27 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 25 out of 27 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 25 out of 27 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; | ||
| import dynamic from "next/dynamic"; | ||
|
|
||
| const ReactQueryDevtools = dynamic( | ||
| () => | ||
| import("@tanstack/react-query-devtools").then( | ||
| (mod) => mod.ReactQueryDevtools, | ||
| ), | ||
| { ssr: false }, | ||
| ); | ||
|
|
||
| import { type ReactNode, useState } from "react"; | ||
|
|
There was a problem hiding this comment.
There is a static import placed after the ReactQueryDevtools constant declaration. With Biome’s organizeImports assist enabled, this typically produces an “organize imports” diagnostic / autofix churn. Consider moving the react import up with the other imports (and letting Biome organize them) so pnpm lint stays clean.
| export async function generateMetadata({ params }: Props): Promise<Metadata> { | ||
| const { slug } = await params; | ||
| const markets = await fetchAllMarkets(); | ||
| const address = |
There was a problem hiding this comment.
fetchAllMarkets() is called in generateMetadata and then again in MarketPage (below). Since this isn’t a fetch() request, Next won’t automatically dedupe it, so this can double the RPC work per request. Consider caching/memoizing the market list (e.g. via react’s cache()), or restructuring so the market list (or resolved address) is computed once and reused for both metadata and rendering.
Summary
Cluster, etcLinks to each active dropset marketMisc changes
useSortedClassesrule fortailwindCSSthat facilitates deterministic sorting ofclassNameclassespnpm lint:ts:fix:unsafepackage.json lint variant for easier access to the unsafe write fixes command